"""
序列解包
"""
a = 1
print(a)
x, y, z = 9, 8, 7
print(x, y, z)
x, y = y, x
print(x, y, z)
# 执行的操作称为序列解包（或可迭代对象解包)

values = 1, 2, 3, 4
a, b, c, d = values
print(d)

dist = {'name': 'Robin', 'girlfriend': 'Marion', 'test': 'test', 'demo': 'demo', 1: 111, 2: 222}
aa, bb = dist.popitem()
print(aa, bb)


# 可使用星号运算符（*）来收集多余的值
aaa, bbb, *ccc, eee = 1, 2, 3, 4, 5
print(ccc, eee)
q, *w, e = '123'
print(q, w, e)


"""
链式赋值
"""
x = y = '123'
print(x, y)


"""
增强赋值
"""
x = 2
x += 1
print(x)
x *= 2
print(x)

